package com.blog.blogservice.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;

import java.util.Date;

/**
 * @author guanglin.ma
 * @date 2024-03-02 23:54
 */
public class AdminClass {

    public static final String FIELD_CREATE_TIME = "createTime";
    public static final String FIELD_UPDATE_TIME = "updateTime";
    public static final String FIELD_UPDATE_BY = "updateBy";
    public static final String FIELD_DELETED = "deleted";
    public static final String FIELD_VERSION_NUM = "versionNum";

    public AdminClass() {
    }

    public AdminClass(Date createTime, Date updateTime, Integer updateBy, Integer deleted, Integer versionNum) {
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
        this.deleted = deleted;
        this.versionNum = versionNum;
    }

    //    创建时间
    private Date createTime;

    //    更新时间
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    //    最终修改人
    private Integer updateBy;

    //    是否删除
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    //    版本号
    @Version
    private Integer versionNum;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Integer updateBy) {
        this.updateBy = updateBy;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getVersionNum() {
        return versionNum;
    }

    public void setVersionNum(Integer versionNum) {
        this.versionNum = versionNum;
    }
}
